RE: VLC x264 GCC profiling
by hakunamatata on Aug 26, 2009 |
hakunamatata
Posts: 2 Joined: Jul 12, 2009 Last seen: Sep 12, 2009 |
||
Hi,
Anyone knows whether there is existing embedded Linux distribution for OpenRISC? What platform are we going to use to run x264 on OpenRISC? standalone x264? Thanks, The ideal solution would be to port it to the OpenRISC-processor first, and then run the profiling. But I'm not sure what workload that would need?! The alternative solution to me, is to select a processor "fairly" simliar with the OpenRISC processor. We will then get fairly accurate information about the bottlenecks etc.. What are you thought!? /Marcus Do we have an OpenRISC simulator(as in SIMULATOR)? If so, we could start with the porting so that it would be useful at the later stage of this project. Another option would be to use an ARM platform; but the effort for porting to ARM will be of no use as we progress; my two cents. -Gijo Yes, the OpenRISC processor has got an architecture-simulator: http://opencores.org/openrisc,or1ksim It's very easy to install the whole toolchain under Linux Ubuntu (or in cygwin under windows), you just run the install-script. More info can be found here: http://opencores.org/openrisc,gnu_toolchain /Marcus |
RE: VLC x264 GCC profiling
by ckavalipati on Aug 26, 2009 |
ckavalipati
Posts: 19 Joined: Aug 3, 2009 Last seen: Oct 30, 2012 |
||
For those of you who might be interested in Windows x264 executable, I checked in latest version of x264 built using Cygwin under trunk/doc/x264_profiling/bin directory.
Running this generates profiling information suitable for gprof. I checked-in gprof (version 2.19.1) compiled for Windows for analyzing the profiling information. Under trunk/doc/x264_profiling/data, there are few data files generated from gprof. I have not analyzed them yet. If you are interested you can take a look at them. The video of clips are huge, the SVN server connection times out when ever I try to upload them. I tried compressing them but still they are pretty big for SVN and my commits are timing out. You can get these clips from this location http://www.tkn.tu-berlin.de/research/evalvid/cif.html |
RE: VLC x264 GCC profiling
by hakunamatata on Aug 26, 2009 |
hakunamatata
Posts: 2 Joined: Jul 12, 2009 Last seen: Sep 12, 2009 |
||
Hi,
Does anyone know whether there is Embedded Linux distribution for OpenRISC? Does the OpenRISC tool chain supports profiling at the moment? On which platform are we going run x264 on OpenRISC? Or just a standalone x264? Thanks Wendy |
RE: VLC x264 GCC profiling
by marcus.erlandsson on Aug 26, 2009 |
marcus.erlandsson
Posts: 38 Joined: Nov 22, 2007 Last seen: Mar 7, 2013 |
||
Hi,
Does anyone know whether there is Embedded Linux distribution for OpenRISC? Does the OpenRISC tool chain supports profiling at the moment? On which platform are we going run x264 on OpenRISC? Or just a standalone x264? Thanks Wendy Yes, Linux-2.6.24 is ported to the OpenRISC processor and are located in the SVN-repo in the OpenRISC project: http://www.opencores.org/openrisc,linux We are continuously working to upgrade the Linux-port and to add features... /Marcus |
RE: VLC x264 GCC profiling
by gil_savir on Aug 26, 2009 |
gil_savir
Posts: 59 Joined: Dec 7, 2008 Last seen: May 10, 2021 |
||
As some one said earlier (alianov I think), we should pick-up video files and options that impact encoding algorithm to collect profiling information. I am not familiar with the encoding algorithm yet. I am trying to read the source.
If someone has better understanding of the encoding algorithm please suggest how we can set this up. I agree. For example, x264 can encode in one, two, or three pass mode (default option is two pass). Such option has a great impact on HW implementation. x264 options are explained here: http://www.digital-digest.com/articles/x264_options_page1.html I'm in middle of learning the SW/HW implication of x264 options. We will need more SW/HW members to understand these implications so we can discuss them and decide which are more important. gil |
RE: VLC x264 GCC profiling
by jeffzhan on Aug 26, 2009 |
jeffzhan
Posts: 5 Joined: Jun 11, 2008 Last seen: Jun 15, 2022 |
||
Hi, if you want to use gprof, you can do as follow,
1 ./configure --enable-gprof 2 ./x264 -o BUS_352x288_30_orig_01.264 BUS_352x288_30_orig_01.yuv 352x288 and gmon.out will be generated, 3 gprof -b x264 gmon.out | less |
RE: VLC x264 GCC profiling
by brianhxh on Aug 27, 2009 |
brianhxh
Posts: 5 Joined: Jul 8, 2009 Last seen: Oct 14, 2009 |
||
Does anyone has a version of x264 that can be compiled using Microsoft Visual Studio? It seems still having a lot of things to do for Windows compilation. I'm not familiar with linux debug environment for C, such as GDB, so can anyone help that? Thanks. Brian, I also tried compiling on MS Visual C/C++, since it seems that the source already comes with Visual C project files. Trying to compile gave me too many warnings and error messages so I was too lazy to debug these. Especially when compiling on Linux with the given configure script and the Makefile is so easy and straightforward. If you insist working with Visual C, I bet you can get some help on the x264 forum: http://forum.doom9.org/forumdisplay.php?f=77 I suggest you try working on Linux (I prefer Ubuntu), using IDE such as Eclipse C/C++. You'll see that debugging with Eclipse is not different than with Visual C/C++. Hi, gil_savir Thanks for your responds. Currently, I have fixed all of the errors when compiling using Microsoft Visual Studio on Windows, here are some notes, hope it can help anyone: 1) If assembly optimization is used, that is (HAVE_MMX for X86, HAVE_ARMV6 for ARM, HAVE_PPC for Power PC...), then corresponding assembler must be installed to ..\Microsoft Visual Studio 9.0\VC\bin, for X86, we can use yasm at http://www.tortall.net/projects/yasm/. 2) If pure C function is expected, all the asm files must be removed from the VC project, and make sure corresponding MACROs is not defined at project properties and source files. 3) All the other errors are related to variable declarations, move up the declarations of the varaiable to begin of the function will fix it. 4) when compiling x264 to EXE file, the "log2f" function used in "analyse.c" must be implemented, because Microsoft does not provide this function in "math.h". static double log2f( double n ) { // log(n)/log(2) is log2. return log( n ) / log( 2 ); } 5) then it's OK! Brian |
RE: VLC x264 GCC profiling
by thsteinle on Aug 27, 2009 |
thsteinle
Posts: 2 Joined: Jul 2, 2009 Last seen: Apr 30, 2024 |
||
Hi,
For those who want to compile for or1ksim the log2f workaround is needed too. And you have to change #define X264_LOOKAHEAD_MAX 250 to #define X264_LOOKAHEAD_MAX 140 /common/common.h line 56. Then x264 can be compiled and started on the simulator. However you cannot encode files because the root directory is read only I haven't found out how to remount it with write access. -Thomas |
RE: VLC x264 GCC profiling
by gshankara on Aug 31, 2009 |
gshankara
Posts: 14 Joined: Aug 30, 2008 Last seen: Oct 20, 2009 |
||
Pardon my ignorance.
I downloaded the x264 form git but am not able to do a build. I tried to use the makefile but am seeing ******************************************************* guru@sandg2:~/vlc/x264$ make -f Makefile Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is yasm-0.6.1 If you really want to compile without asm, configure with --disable-asm. make: *** [config.mak] Error 1 guru@sandg2:~/vlc/x264$ ******************************************************* Do I need to do something before I run the make? Thanks, Guru |
RE: VLC x264 GCC profiling
by gil_savir on Aug 31, 2009 |
gil_savir
Posts: 59 Joined: Dec 7, 2008 Last seen: May 10, 2021 |
||
******************************************************* guru@sandg2:~/vlc/x264$ make -f Makefile Makefile:3: config.mak: No such file or directory ./configure Found no assembler Minimum version is yasm-0.6.1 If you really want to compile without asm, configure with --disable-asm. make: *** [config.mak] Error 1 guru@sandg2:~/vlc/x264$ ******************************************************* Do I need to do something before I run the make? Thanks, Guru I had this problem too. I solved it by installing 'yasm' (on Ubuntu, using synaptic). I guess it can be compiled as well without 'yasm' (which will exclude all assembler optimizations). Try executing configure with the suggested switch and only then run the Makfile: ./configure --disable-asm make I didn't try it myself, so I don't know if it'll work. - gil |
RE: VLC x264 GCC profiling
by gshankara on Aug 31, 2009 |
gshankara
Posts: 14 Joined: Aug 30, 2008 Last seen: Oct 20, 2009 |
||
Thanks gil.
I installed the yasm (sudo apt-get install yasm) and then tried it again. This time, it went through but I got some warnings. Many of those warnings relate to array indexing. warning: array subscript is above array bounds. The affected modules are ***************************************************************** common/macroblock.c: In function ‘x264_macroblock_slice_init’: common/macroblock.c: In function ‘x264_macroblock_slice_init’: common/dct.c: In function ‘zigzag_scan_8x8_field’: common/dct.c: In function ‘zigzag_scan_4x4_frame’: common/dct.c: In function ‘zigzag_scan_4x4_field’: common/set.c: In function ‘x264_cqm_init’: common/common.c: In function ‘x264_param_parse’: common/set.c: In function ‘x264_cqm_init’: common/quant.c: In function ‘quant_4x4’: common/quant.c: In function ‘quant_4x4_dc’: **************************************************************** Other warnings that I got were common/common.c:256: warning: ‘saveptr’ may be used uninitialized in this function encoder/ratecontrol.c:687: warning: ‘saveptr’ may be used uninitialized in this function encoder/ratecontrol.c: In function ‘rate_estimate_qscale’: encoder/ratecontrol.c:1571: warning: ‘rce.expected_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.new_qscale’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.tex_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.qscale’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.mv_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.misc_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.expected_vbv’ may be used uninitialized in this function encoder/macroblock.c:852: warning: ‘mvp[1]’ may be used uninitialized in this function *************************************************************************** Do I need to be concerned about those warnings? I now have the .o files guru@sandg2:~/vlc/x264$ ls *.o matroska.o muxers.o x264.o Do I have everything I need to run profiling? I am thinking of running the test streams that everyone else has run to get a baseline comparison. Any feedback is welcome. Thanks in advaance. Guru |
RE: VLC x264 GCC profiling
by gshankara on Aug 31, 2009 |
gshankara
Posts: 14 Joined: Aug 30, 2008 Last seen: Oct 20, 2009 |
||
Thanks gil. (Please ignore if this is a duplicate)
I installed the yasm (sudo apt-get install yasm) and then tried it again. This time, it went through but I got some warnings. Many of those warnings relate to array indexing. warning: array subscript is above array bounds. The affected modules are ***************************************************************** common/macroblock.c: In function ‘x264_macroblock_slice_init’: common/macroblock.c: In function ‘x264_macroblock_slice_init’: common/dct.c: In function ‘zigzag_scan_8x8_field’: common/dct.c: In function ‘zigzag_scan_4x4_frame’: common/dct.c: In function ‘zigzag_scan_4x4_field’: common/set.c: In function ‘x264_cqm_init’: common/common.c: In function ‘x264_param_parse’: common/set.c: In function ‘x264_cqm_init’: common/quant.c: In function ‘quant_4x4’: common/quant.c: In function ‘quant_4x4_dc’: **************************************************************** Other warnings that I got were common/common.c:256: warning: ‘saveptr’ may be used uninitialized in this function encoder/ratecontrol.c:687: warning: ‘saveptr’ may be used uninitialized in this function encoder/ratecontrol.c: In function ‘rate_estimate_qscale’: encoder/ratecontrol.c:1571: warning: ‘rce.expected_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.new_qscale’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.tex_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.qscale’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.mv_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.misc_bits’ may be used uninitialized in this function encoder/ratecontrol.c:1571: warning: ‘rce.expected_vbv’ may be used uninitialized in this function encoder/macroblock.c:852: warning: ‘mvp[1]’ may be used uninitialized in this function *************************************************************************** Do I need to be concerned about those warnings? I now have the .o files guru@sandg2:~/vlc/x264$ ls *.o matroska.o muxers.o x264.o Do I have everything I need to run profiling? Should I have added the compile option -pg or something else? It would be useful if you could point me to the right places on the Makefile script. I downloaded a couple of streams to try out. I am thinking of running the test streams that everyone else has run to get a baseline comparision. Thanks, Guru |
RE: VLC x264 GCC profiling
by gil_savir on Aug 31, 2009 |
gil_savir
Posts: 59 Joined: Dec 7, 2008 Last seen: May 10, 2021 |
||
Hi Guru,
I had similar warnings on my machine as well. I guess it is OK, but I cannot guarantee it. These questions may be answered on the x264 forum: http://forum.doom9.org/forumdisplay.php?f=77 I didn't do any profiling yet since there is a bunch of x264 options we need to choose for the profiling to be adequate for HW analysis. For example, the profiling files uploaded to the SVN (/oc-h264-encoder/trunk/doc/x264_profiling/data/) contain functions such as "x264_mb_analyse_inter_b8x8", which deals with B-frames. However, in basline profile (which is the profile our H.264 encoder should implement in first place) B-frames do not exist. In order to profile the x264, a basic understanding of the x264 code and the H.264 baseline profile, and a good understanding of x264 options is required. I'm spending my free time learning this stuff, and I think we need some people with such knowledge, so we can select the correct x264 options for profiling. Anyway, if you want to do some profiling, the current thread contains explanation for doing so. You should also read a tutorial about 'gprof', if you are not already acquainted to its use. - gil |
RE: VLC x264 GCC profiling
by gshankara on Aug 31, 2009 |
gshankara
Posts: 14 Joined: Aug 30, 2008 Last seen: Oct 20, 2009 |
||
Thanks for the response, Gil.
I agree that we need to understand the code and all the options that are relevant to our core development. But, I am trying to just get familiar with using the software tools and processes since I do not have a S/W background and I am a RTL type.. Will bug you guys later if I have any questions. Thanks, Guru |
RE: VLC x264 GCC profiling
by gijoprems on Sep 1, 2009 |
gijoprems
Posts: 13 Joined: Jun 17, 2008 Last seen: Jan 8, 2014 |
||
I profiled x264 for encoding a 720p50 yuv sequence with 500+ frames; encoded using x264 baseline profile at 50fps. The profile output is checked-in. Please have a look.
PS:- Encoding was done on an Intel Core2Duo 1.6GHz, 1GB RAM with 50% CPU load. -Gijo |